package com.shop.dao;

import java.util.List;

import com.shop.bean.OrderItem;

/** 
 * @className: IOrderItemDao.java
 * @classDescription: 
 * @function: 
 * @author: Wentasy
 * @createTime: 2012-11-1 下午07:10:19
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public interface IOrderItemDao {
	/**
	 * 新建订单项
	 * 
	 * @param orders
	 * @throws Exception
	 */
	public int createOrderItem(OrderItem orderItem) throws Exception;

	/**  
	 * 
	 * 更新订单项
	 * 
	 * @param orders
	 * @throws Exception
	 */
	public int updateOrderItem(OrderItem orderItem) throws Exception;

	/**
	 * 根据Id删除订单项
	 * 
	 * @param orderId
	 * @throws Exception
	 */
	public int deleteOrderItemById(long orderItemId) throws Exception;

	/**
	 * 根据Id查询订单项
	 * 
	 * @param orderId
	 * @return
	 * @throws Exception
	 */
	public OrderItem queryOrderItemById(long orderItemId) throws Exception;
    
	/**
	 *  根据orderId查询订单项
	 * @param orderId
	 * @return
	 * @throws Exception
	 */
	public List<OrderItem> queryOrderItemByOrderId(long orderId) throws Exception;
	/**
	 * 查询所有的订单项
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<OrderItem> queryAllOrderItem() throws Exception;
	
	/**
	 * 分页查询所有的订单项
	 * @param pageSize
	 * @param pageNow
	 * @return
	 * @throws Exception
	 */
	public List<OrderItem> queryAllOrderItem(int startPage,int pageSize) throws Exception;
}
